#include <57header.h>

/* Usage: ./02_read filename */
int main(int argc, char *argv[]){
    ARGS_CHECK(argc, 2);
    int fd = open(argv[1], O_RDWR);
    ERROR_CHECK(fd, -1, "open");

    // 开始read
    char buf[5] = {0};
    int count = read(fd, buf, sizeof(buf));
    printf("count = %d\n", count);
    puts(buf);

    close(fd);
    return 0;
}

